<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('订单列表')" />
</head>
<body class="gray-bg">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/order";

        $(function() {
            var options = {
                url: prefix + "/queryOrderList",
                updateUrl: prefix + "/saleAfter/{id}",
                sortName: "createTime",
                modalName: "申请售后",
                columns: [{
                    checkbox: false
                },
                    {
                        field: 'orderId',
                        title: '订单编号'
                    },
                    {
                        field: 'deviceId',
                        title: '设备编号'
                    },
                    {
                        field: 'deviceName',
                        title: '设备名称',
                        sortable: true
                    },
                    {
                        field: 'createTime',
                        title: '创建时间',
                        sortable: true
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function(value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.saleAfter(\'' + row.orderId + '\')"><i class="fa fa-edit"></i>申请售后</a> ');
                            return actions.join('');
                        }
                    }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
